<template>
  <div class="about">
    <h1>This is an about page</h1>
  </div>
</template>

<script>
import http from "axios";

export default {
  name: "About",
  async created() {
    // this.timeout(3000)
    //   .then((res) => {
    //     console.log(res)
    //   })
    try {
      const res = await http({
        url: 'https://gank.io/api/v2/banners'
      })
      console.log(res)
      const res1 = await http({
        url: 'https://gank.io/api/v2/data/category/Girl/type/Girl/page/1/count/10'
      })
      // throw new Error('error:')
      console.log(res1)
    } catch (e) {
      //
      console.log(e)
    }
  },
  /*async mounted() {
    await this.timeout(3000)
    console.log("await over!!! 3000")
    await this.timeout(5000)
    console.log("await over!!! 5000")
  },*/
  methods: {
    timeout(ms) {
      return new Promise((resolve) => {
        setTimeout(resolve, ms)
      })
    }
  }
};
</script>
